home *** CD-ROM | disk | FTP | other *** search
- //***********************************************************************
- //
- // WandDoc.cpp
- //
- //***********************************************************************
-
- #include <afxwin.h>
- #include "WandDoc.h"
-
- IMPLEMENT_DYNCREATE (CWandDoc, CDocument)
-
- BOOL CWandDoc::RouteCmdToAllViews (CView* pView, UINT nID, int nCode,
- void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
- {
- POSITION pos = GetFirstViewPosition ();
-
- while (pos != NULL) {
- CView* pNextView = GetNextView (pos);
- if (pNextView != pView) {
- // Cast CView upward to CCmdTarget because OnCmdMsg is
- // erroneously declared protected in CView
- if (((CCmdTarget*) pNextView)->OnCmdMsg (nID, nCode,
- pExtra, pHandlerInfo))
- return TRUE;
- }
- }
- return FALSE;
- }
-